package com.ae.service.impl;

import com.ae.mapper.VideoMapper;
import com.ae.pojo.QueryVo;
import com.ae.pojo.Video;
import com.ae.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author bug-termination
 * @date 2020-10-19 17:38
 */
@Service
public class VideoServiceImpl implements VideoService {

    @Autowired
    private VideoMapper videoMapper;
    @Override
    public List<Video> findByCourseId(Integer courseId) {
        return videoMapper.findByCourseId(courseId);
    }

    @Override
    public Video selectByPrimaryKey(Integer id) {
        return videoMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Video> findAllVideo(QueryVo queryVo) {
        return videoMapper.findAllVideo(queryVo);
    }

    @Override
    public Integer getTotalCount() {
        return videoMapper.getTotalCount();
    }

    @Override
    public List<Video> list(QueryVo queryVo) {
        return videoMapper.list(queryVo);
    }

    @Override
    public int updateByPrimaryKeySelective(Video record) {
        return videoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int insertSelective(Video record) {
        return videoMapper.insertSelective(record);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return videoMapper.deleteByPrimaryKey(id);
    }
}
